package mywebapps.security.jsf;

import java.util.List;

import javax.annotation.PostConstruct;

import mywebapps.security.dao.RoleDao;
import mywebapps.security.model.Role;

public class ManageRolesAction
{
    private RoleDao roleDao;
    private List<Role> roles;

    @PostConstruct
    public void init()
    {
        roles = roleDao.getAllRoles();
    }
    
    public RoleDao getRoleDao()
    {
        return roleDao;
    }

    public void setRoleDao(RoleDao roleDao)
    {
        this.roleDao = roleDao;
    }

    public List<Role> getRoles()
    {
        return roles;
    }
}
